/**
 * Created with JetBrains WebStorm.
 * User: zhaoyanchao
 * Date: 13-7-6
 * Time: 上午10:41
 * To change this template use File | Settings | File Templates.
 */
var mysql = require('mysql'),
    config = require('./config').config;
function getcityCode(callback) {
    var connection = mysql.createConnection(config.app_weibo);
    connection.connect();
    connection.query('SELECT cityCode FROM app_weibo.cityInfo',function(err,rows){
        if (err) throw err;
        callback.apply(this,[rows]);
        connection.end();
    });
}
exports.getcityCode =getcityCode
